package com.lm.survey.model;

import java.util.ArrayList;
import java.util.List;

public class QuestionItemInstance {
    int id;
    int qid;
    int gid;
    int itemId;
    QuestionItem questionItem;
    
    int activityParticipantId;
    String comment;
    int relationTypeValue;
    String assistant;
    int score;
    String expertComment;
    int rightStatus;
    
    
    public int getRightStatus() {
        return rightStatus;
    }

    public void setRightStatus(int rightStatus) {
        this.rightStatus = rightStatus;
    }

    public String getExpertComment() {
        return expertComment;
    }

    public void setExpertComment(String expertComment) {
        this.expertComment = expertComment;
    }

    public QuestionItem getQuestionItem() {
        return questionItem;
    }

    public void setQuestionItem(QuestionItem questionItem) {
        this.questionItem = questionItem;
    }
    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }
    List<ChoiceInstance> choices = new ArrayList<ChoiceInstance>();
    
    public String getAssistant() {
        return assistant;
    }

    public void setAssistant(String assistant) {
        this.assistant = assistant;
    }

    public List<ChoiceInstance> getChoices() {
        return choices;
    }
    
    public ChoiceInstance getChoiceInstance(int templateId){
        ChoiceInstance ins = null;
        for(int i=0;i<choices.size();i++){
            ins = choices.get(i);
            if(ins.getTemplateId() == templateId){
                return ins;
            }
        }
        return null;
    }
    
    public void setChoices(List<ChoiceInstance> choices) {
        this.choices = choices;
    }
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public int getQid() {
        return qid;
    }
    public void setQid(int qid) {
        this.qid = qid;
    }
    public int getGid() {
        return gid;
    }
    public void setGid(int gid) {
        this.gid = gid;
    }
    public int getItemId() {
        return itemId;
    }
    public void setItemId(int itemId) {
        this.itemId = itemId;
    }
    public int getActivityParticipantId() {
        return activityParticipantId;
    }
    public void setActivityParticipantId(int activityParticipantId) {
        this.activityParticipantId = activityParticipantId;
    }
    public String getComment() {
        return comment;
    }
    public void setComment(String comment) {
        this.comment = comment;
    }
    public int getRelationTypeValue() {
        return relationTypeValue;
    }
    public void setRelationTypeValue(int relationTypeValue) {
        this.relationTypeValue = relationTypeValue;
    }
}
